import { ElMessage, ElLoading } from 'element-plus';



export function msgFn(message: string, type = 'error', duration = 1000) {
    return ElMessage({
        type,
        message,
        'showClose': true,
        duration
    });
}


export function showLoading(options = {}) {
    const defaultOpt = {
        'text': '玩命加载中...',
        'fullscreen': true,
        'background': 'rgba(0, 0, 0, 0.5)',
        'lock': true
    };
    return ElLoading.service(UtilTools.extend(defaultOpt, options));
}
